﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class SoftServerMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.SoftServer>
    {
        public SoftServerMap()
        {
            // table
            //ToTable("CMS_SoftServer");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.ModelId)
                
                .IsRequired();
            Property(t => t.ServerName)
                
                .HasMaxLength(255)
                .IsRequired();
            Property(t => t.DownURL)
                
                .HasMaxLength(255)
                .IsRequired();
            Property(t => t.LinkProperty)
                
                .IsRequired();
            Property(t => t.ParentId)
                
                .IsOptional();
            Property(t => t.RootId)
                
                .IsRequired();
            Property(t => t.OrderId)
                
                .IsRequired();
            Property(t => t.IsLock)
                
                .IsRequired();
            Property(t => t.ServerHTML)
                
                .HasMaxLength(255)
                .IsRequired();

            // Relationships

            //InitializeMapping();
        }
    }
}

